var tDate = require("../../../utils/date.js");
const util = require("../../../utils/util.js");

const app = getApp()
var that;
Page({

  /**
   * 页面的初始数据
   */
  data: {
    todayMaterialArray: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    that = this;
    this.$wuxToast = app.wux(this).$wuxToast;
    // 加载数据
    this.loadMaterialsData();
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },
  loadMaterialsData: function () {
    //加载提示框
    util.showLoading();
    var urlStr = '/api/adminUser/count';
    util.request(urlStr, "", function (res) {
      util.hideToast();
      console.log("+++++请求成功");
      console.log("物料data===" + res.data.data);
      var materialData = res.data.data;

      that.setData({
        todayMaterialArray: materialData
      });
    });
  }
})